# Maintainer: Jan de Groot <jgc@archlinux.org>
# Maintainer: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>

pkgname=geocode-glib
pkgver=3.26.2
pkgrel=1
pkgdesc="Helper library for geocoding services"
url="https://gitlab.gnome.org/GNOME/geocode-glib"
arch=(x86_64)
license=(LGPL)
depends=(glib2 json-glib libsoup)
makedepends=(gobject-introspection git gtk-doc meson)
_commit=34f420cbe1ff3f45fde9179ba07e0259b9ce505b  # tags/3.26.2^0
source=("git+https://gitlab.gnome.org/GNOME/geocode-glib.git#commit=$_commit")
sha256sums=('SKIP')

pkgver() {
  cd $pkgname
  git describe --tags | sed 's/-/+/g'
}

prepare() {
  cd $pkgname
  sed -i 's/gnome/Adwaita/' icons/meson.build
}

build() {
  arch-meson $pkgname build -D enable-installed-tests=false
  ninja -C build
}

check() {
  meson test -C build --print-errorlogs
}

package() {
  DESTDIR="$pkgdir" meson install -C build
}

